home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2005 Utilities / CHIP Utilities 2005.7z / CHIP Utilities 2005.iso / docs / freedos / www.fcpa.com / includes / support_side_nav.js < prev   
Encoding:
JavaScript  |  2004-10-27  |  13.9 KB  |  337 lines

  1. //     Last modified 4-27-04 by Moonstone Interactive an
  2. //an: I've added functions to serve the new support section left nav for each group on 3-3-04 - HDD, MO and Scanners and tweaked content of those since then - added tape drive section 4-27-04
  3.  
  4. //    AK: I've added in a variable (nameOfSection) that is passed
  5. //    into the function when called. 
  6. //
  7. //     This was necessary because the support section will have
  8. //    exactly the same sidebar as the products section, only it
  9. //    will link directly to the support subpage of the product
  10. //     in question.
  11. //
  12. //    e.g. If you click on Support, then (sidenav) Scanners,
  13. //    then (sidenav) ScanPartner 15C, you will be taken to:
  14. //    /products/scanners/scanpartner-15c/tech-info.html
  15.  
  16. // This Creates the Side Bar Nav for all Scanner support pages
  17. function CreateSideNavScanner(activeSideNavRow, nameOfSection){
  18.     sideNavRows = "";
  19.     
  20.     // Add Product Name and Link to Array
  21.     subNavNameLinkArray = new Array(
  22.     ["Scanners","/support/scanners/"],
  23.     ["Technical Data","/support/scanners/technical-data.html"],
  24.     ["Drivers & Downloads","/support/scanners/online-scanner-warranty.html"],
  25.     ["Installation Guides","/support/scanners/installation-guides.html"],
  26.     ["Knowledge Base","javascript:;' onclick='javascript:window.open(\"http://server.iad.liveperson.net/hc/s-40295231/cmd/kb/kbvisitorcontrol.jsp\",\"knowledgebase\",\"width=700,height=500,scrollbars=yes,resizable=yes\")\'"],
  27.     ["Scanner Service Plans","/warranties/service-programs/imaging-service-offerings.html"],
  28.     ["Consumables Quick Reference","/support/scanners/consumables_quick_ref.html"],
  29.     ["Contact Scanner Support","/support/scanners/contact.html"]
  30.     );
  31.     
  32.     
  33.     // Create Product rows for side nav.
  34.     for ( idx = 0; idx < subNavNameLinkArray.length; idx++) {
  35.         // Start Side Nav Row
  36.         sideNavRows += "<tr><td width=\"12\" valign='top'>";
  37.         
  38.         // Set Side Nav Image
  39.         if (idx == 0) {
  40.             // First row of Side Nav
  41.             sideNavRows += "<img src='/img/global_subnav_arrow_on.gif' width='10' height='19' alt='' border='0'></td>";
  42.         }else if (idx == subNavNameLinkArray.length - 1){
  43.             // Last row of Side Nav
  44.             sideNavRows += "<img src='/img/global_subnav_endbar.gif' width='10' height='13' alt='' border='0'></td>";
  45.         }else{
  46.             //    Middle rows of Side Nav
  47.             sideNavRows += "<img src='/img/global_subnav_midbar.gif' width='10' height='13' alt='' border='0'></td>";
  48.         }
  49.         
  50.         // Check to see if active page
  51.         if (activeSideNavRow == subNavNameLinkArray[idx][0]) {
  52.             // Dont Make link hot
  53.             // Set Side Nav Value and Link
  54.             sideNavRows += "<td width=\"133\"><font face='Arial, Helvetica, Sans-serif' size='1'>" + subNavNameLinkArray[idx][0] + "</font>";
  55.         }else{
  56.             // Make it NOT hot and Bold,
  57.             // only if this is not one of the subheadings of the Discontinued products section.
  58.             if(subNavNameLinkArray[idx][1] == "") {
  59.                 sideNavRows += "<td><font face='Arial, Helvetica, Sans-serif' size='1'><b>" + subNavNameLinkArray[idx][0] + "</b></font>";
  60.             } else {
  61.             // Make the link hot
  62.             if (nameOfSection == "support") {
  63.                 var strLinkHref = subNavNameLinkArray[idx][1];
  64.                 /*
  65.             } else if (nameOfSection == "support") {
  66.                 var strLinkHref = subNavNameLinkArray[idx][1] + "tech-info.html"; */
  67.             }
  68.             sideNavRows += "<td width=\"133\"><a href='" + strLinkHref + "'><font face='Arial, Helvetica, Sans-serif' size='1'>" + subNavNameLinkArray[idx][0] + "</font></a>";
  69.             }
  70.         }
  71.         
  72.         // Close Side Nav Row
  73.         sideNavRows += "</td></tr>";
  74.     }
  75.     document.write(sideNavRows);
  76. }
  77.  
  78. //this creates the knowledgebase popup window and makes sure if it's already open it comes into focus
  79. var objKnowledgeBaseWindow = null; 
  80.  
  81. function openKnowledgeBaseWindow() {
  82.   bOpen = true;
  83.   if (objKnowledgeBaseWindow != null) {
  84.     bOpen = objKnowledgeBaseWindow.closed;
  85.   }
  86.   if (bOpen) {
  87.     objKnowledgeBaseWindow = window.open('http:/\/www2.fcpa.fujitsu.com/kb/','spgkb','width=700,height=530,scrollbars=yes,resizable=yes');
  88.   }
  89.   else {
  90.     objKnowledgeBaseWindow.focus();
  91.   }
  92. }
  93.  
  94.  
  95.  
  96. // This Creates the Side Bar Nav for all HD support pages
  97. function CreateSideNavHD(activeSideNavRow, nameOfSection){
  98.     sideNavRows = "";
  99.     
  100.     // Add Product Name and Link to Array
  101.     subNavNameLinkArray = new Array(
  102.     ["Hard Drives","/support/hard-drives/"],
  103.     ["Technical Data","/support/hard-drives/technical-data.html"],
  104.     ["Software Utilities","/support/hard-drives/software_utilities.html"],
  105.     ["Installation Guides","/support/hard-drives/installation-guides.html"],
  106.     ["How to Read Models","/support/hard-drives/how-to-read.html"],
  107.     ["Knowledge Base","javascript:;' onclick='javascript:window.open(\"http://server.iad.liveperson.net/hc/s-40295231/cmd/kb/kbvisitorcontrol.jsp\",\"knowledgebase\",\"width=700,height=500,scrollbars=yes,resizable=yes\")\'"],
  108.     ["Contact Hard Drive Support","/support/hard-drives/contact.html"]
  109.     );
  110.     
  111.     
  112.     // Create Product rows for side nav.
  113.     for ( idx = 0; idx < subNavNameLinkArray.length; idx++) {
  114.         // Start Side Nav Row
  115.         sideNavRows += "<tr><td width=\"12\" valign='top'>";
  116.         
  117.         // Set Side Nav Image
  118.         if (idx == 0) {
  119.             // First row of Side Nav
  120.             sideNavRows += "<img src='/img/global_subnav_arrow_on.gif' width='10' height='19' alt='' border='0'></td>";
  121.         }else if (idx == subNavNameLinkArray.length - 1){
  122.             // Last row of Side Nav
  123.             sideNavRows += "<img src='/img/global_subnav_endbar.gif' width='10' height='13' alt='' border='0'></td>";
  124.         }else{
  125.             //    Middle rows of Side Nav
  126.             sideNavRows += "<img src='/img/global_subnav_midbar.gif' width='10' height='13' alt='' border='0'></td>";
  127.         }
  128.         
  129.         // Check to see if active page
  130.         if (activeSideNavRow == subNavNameLinkArray[idx][0]) {
  131.             // Dont Make link hot
  132.             // Set Side Nav Value and Link
  133.             sideNavRows += "<td width=\"133\"><font face='Arial, Helvetica, Sans-serif' size='1'>" + subNavNameLinkArray[idx][0] + "</font>";
  134.         }else{
  135.             // Make it NOT hot and Bold,
  136.             // only if this is not one of the subheadings of the Support section.
  137.             if(subNavNameLinkArray[idx][1] == "") {
  138.                 sideNavRows += "<td><font face='Arial, Helvetica, Sans-serif' size='1'><b>" + subNavNameLinkArray[idx][0] + "</b></font>";
  139.             } else {
  140.             // Make the link hot
  141.             if (nameOfSection == "support") {
  142.                 var strLinkHref = subNavNameLinkArray[idx][1];
  143.                 /**/
  144.             } else if (nameOfSection == "support") {
  145.                 var strLinkHref = subNavNameLinkArray[idx][1] + "tech-info.html"; 
  146.             }
  147.             sideNavRows += "<td width=\"133\"><a href='" + strLinkHref + "'><font face='Arial, Helvetica, Sans-serif' size='1'>" + subNavNameLinkArray[idx][0] + "</font></a>";
  148.             }
  149.         }
  150.         
  151.         // Close Side Nav Row
  152.         sideNavRows += "</td></tr>";
  153.     }
  154.     document.write(sideNavRows);
  155. }
  156.  
  157.  
  158. // This Creates the Side Bar Nav for all MO Drive support pages
  159. function CreateSideNavMO(activeSideNavRow, nameOfSection){
  160.     sideNavRows = "";
  161.     
  162.     // Add Product Name and Link to Array
  163.     subNavNameLinkArray = new Array(
  164.     ["Optical Storage Products","/support/mo-drives/"],
  165.     ["Technical Data","/support/mo-drives/technical-data.html"],
  166.     ["Drivers & Downloads","/support/mo-drives/drivers_downloads.html"],
  167.     ["Knowledge Base","javascript:;' onclick='javascript:window.open(\"http://server.iad.liveperson.net/hc/s-40295231/cmd/kb/kbvisitorcontrol.jsp\",\"knowledgebase\",\"width=700,height=500,scrollbars=yes,resizable=yes\")\'"],
  168.     ["Contact MO Support","/support/mo-drives/contact.html"]
  169.     );
  170.     
  171.     
  172.     // Create Product rows for side nav.
  173.     for ( idx = 0; idx < subNavNameLinkArray.length; idx++) {
  174.         // Start Side Nav Row
  175.         sideNavRows += "<tr><td width=\"12\" valign='top'>";
  176.         
  177.         // Set Side Nav Image
  178.         if (idx == 0) {
  179.             // First row of Side Nav
  180.             sideNavRows += "<img src='/img/global_subnav_arrow_on.gif' width='10' height='19' alt='' border='0'></td>";
  181.         }else if (idx == subNavNameLinkArray.length - 1){
  182.             // Last row of Side Nav
  183.             sideNavRows += "<img src='/img/global_subnav_endbar.gif' width='10' height='13' alt='' border='0'></td>";
  184.         }else{
  185.             //    Middle rows of Side Nav
  186.             sideNavRows += "<img src='/img/global_subnav_midbar.gif' width='10' height='13' alt='' border='0'></td>";
  187.         }
  188.         
  189.         // Check to see if active page
  190.         if (activeSideNavRow == subNavNameLinkArray[idx][0]) {
  191.             // Dont Make link hot
  192.             // Set Side Nav Value and Link
  193.             sideNavRows += "<td width=\"133\"><font face='Arial, Helvetica, Sans-serif' size='1'>" + subNavNameLinkArray[idx][0] + "</font>";
  194.         }else{
  195.             // Make it NOT hot and Bold,
  196.             // only if this is not one of the subheadings of the Discontinued products section.
  197.             if(subNavNameLinkArray[idx][1] == "") {
  198.                 sideNavRows += "<td><font face='Arial, Helvetica, Sans-serif' size='1'><b>" + subNavNameLinkArray[idx][0] + "</b></font>";
  199.             } else {
  200.             // Make the link hot
  201.             if (nameOfSection == "support") {
  202.                 var strLinkHref = subNavNameLinkArray[idx][1];
  203.                 /*
  204.             } else if (nameOfSection == "support") {
  205.                 var strLinkHref = subNavNameLinkArray[idx][1] + "tech-info.html"; */
  206.             }
  207.             sideNavRows += "<td width=\"133\"><a href='" + strLinkHref + "'><font face='Arial, Helvetica, Sans-serif' size='1'>" + subNavNameLinkArray[idx][0] + "</font></a>";
  208.             }
  209.         }
  210.         
  211.         // Close Side Nav Row
  212.         sideNavRows += "</td></tr>";
  213.     }
  214.     document.write(sideNavRows);
  215. }
  216.  
  217.  
  218.  
  219. // This Creates the Side Bar Nav for all Printer support pages
  220. function CreateSideNavPrinters(activeSideNavRow, nameOfSection){
  221.     sideNavRows = "";
  222.     
  223.     // Add Product Name and Link to Array
  224.     subNavNameLinkArray = new Array(
  225.     ["Printers","/support/printers/"],
  226.     ["Technical Data","/support/printers/technical-data.html"],
  227.     ["Installation Guides","/support/printers/installation-guides.html"],
  228.     ["Knowledge Base","javascript:;' onclick='javascript:window.open(\"http://server.iad.liveperson.net/hc/s-40295231/cmd/kb/KBVisitorControl.jsp?cmd=categorybrowse&categoryId=2045\",\"knowledgebase\",\"width=700,height=500,scrollbars=yes,resizable=yes\")\'"],
  229.     ["Drivers & Downloads","/support/printers/drivers-downloads.html"],
  230.     ["Contact Printer Support","/support/printers/contact.html"]
  231.     );
  232.     
  233.     
  234.     // Create Product rows for side nav.
  235.     for ( idx = 0; idx < subNavNameLinkArray.length; idx++) {
  236.         // Start Side Nav Row
  237.         sideNavRows += "<tr><td width=\"12\" valign='top'>";
  238.         
  239.         // Set Side Nav Image
  240.         if (idx == 0) {
  241.             // First row of Side Nav
  242.             sideNavRows += "<img src='/img/global_subnav_arrow_on.gif' width='10' height='19' alt='' border='0'></td>";
  243.         }else if (idx == subNavNameLinkArray.length - 1){
  244.             // Last row of Side Nav
  245.             sideNavRows += "<img src='/img/global_subnav_endbar.gif' width='10' height='13' alt='' border='0'></td>";
  246.         }else{
  247.             //    Middle rows of Side Nav
  248.             sideNavRows += "<img src='/img/global_subnav_midbar.gif' width='10' height='13' alt='' border='0'></td>";
  249.         }
  250.         
  251.         // Check to see if active page
  252.         if (activeSideNavRow == subNavNameLinkArray[idx][0]) {
  253.             // Dont Make link hot
  254.             // Set Side Nav Value and Link
  255.             sideNavRows += "<td width=\"133\"><font face='Arial, Helvetica, Sans-serif' size='1'>" + subNavNameLinkArray[idx][0] + "</font>";
  256.         }else{
  257.             // Make it NOT hot and Bold,
  258.             // only if this is not one of the subheadings of the Support section.
  259.             if(subNavNameLinkArray[idx][1] == "") {
  260.                 sideNavRows += "<td><font face='Arial, Helvetica, Sans-serif' size='1'><b>" + subNavNameLinkArray[idx][0] + "</b></font>";
  261.             } else {
  262.             // Make the link hot
  263.             if (nameOfSection == "support") {
  264.                 var strLinkHref = subNavNameLinkArray[idx][1];
  265.                 /**/
  266.             } else if (nameOfSection == "support") {
  267.                 var strLinkHref = subNavNameLinkArray[idx][1] + "tech-info.html"; 
  268.             }
  269.             sideNavRows += "<td width=\"133\"><a href='" + strLinkHref + "'><font face='Arial, Helvetica, Sans-serif' size='1'>" + subNavNameLinkArray[idx][0] + "</font></a>";
  270.             }
  271.         }
  272.         
  273.         // Close Side Nav Row
  274.         sideNavRows += "</td></tr>";
  275.     }
  276.     document.write(sideNavRows);
  277. }
  278.  
  279.  
  280.  
  281. // This Creates the Side Bar Nav for all Tape Drive support pages
  282. function CreateSideNavTD(activeSideNavRow, nameOfSection){
  283.     sideNavRows = "";
  284.     
  285.     // Add Product Name and Link to Array
  286.     subNavNameLinkArray = new Array(
  287.     ["Tape Drives","/support/tape-drives/"],
  288.     ["Technical Data","/support/tape-drives/technical-data.html"],
  289.     ["Drivers & Downloads","/support/tape-drives/drivers-downloads.html"],
  290.     ["Contact Tape Drive Support","/support/tape-drives/contact.html"]
  291.     );
  292.     
  293.     
  294.     // Create Product rows for side nav.
  295.     for ( idx = 0; idx < subNavNameLinkArray.length; idx++) {
  296.         // Start Side Nav Row
  297.         sideNavRows += "<tr><td width=\"12\" valign='top'>";
  298.         
  299.         // Set Side Nav Image
  300.         if (idx == 0) {
  301.             // First row of Side Nav
  302.             sideNavRows += "<img src='/img/global_subnav_arrow_on.gif' width='10' height='19' alt='' border='0'></td>";
  303.         }else if (idx == subNavNameLinkArray.length - 1){
  304.             // Last row of Side Nav
  305.             sideNavRows += "<img src='/img/global_subnav_endbar.gif' width='10' height='13' alt='' border='0'></td>";
  306.         }else{
  307.             //    Middle rows of Side Nav
  308.             sideNavRows += "<img src='/img/global_subnav_midbar.gif' width='10' height='13' alt='' border='0'></td>";
  309.         }
  310.         
  311.         // Check to see if active page
  312.         if (activeSideNavRow == subNavNameLinkArray[idx][0]) {
  313.             // Dont Make link hot
  314.             // Set Side Nav Value and Link
  315.             sideNavRows += "<td width=\"133\"><font face='Arial, Helvetica, Sans-serif' size='1'>" + subNavNameLinkArray[idx][0] + "</font>";
  316.         }else{
  317.             // Make it NOT hot and Bold,
  318.             // only if this is not one of the subheadings of the Support section.
  319.             if(subNavNameLinkArray[idx][1] == "") {
  320.                 sideNavRows += "<td><font face='Arial, Helvetica, Sans-serif' size='1'><b>" + subNavNameLinkArray[idx][0] + "</b></font>";
  321.             } else {
  322.             // Make the link hot
  323.             if (nameOfSection == "support") {
  324.                 var strLinkHref = subNavNameLinkArray[idx][1];
  325.                 /**/
  326.             } else if (nameOfSection == "support") {
  327.                 var strLinkHref = subNavNameLinkArray[idx][1] + "tech-info.html"; 
  328.             }
  329.             sideNavRows += "<td width=\"133\"><a href='" + strLinkHref + "'><font face='Arial, Helvetica, Sans-serif' size='1'>" + subNavNameLinkArray[idx][0] + "</font></a>";
  330.             }
  331.         }
  332.         
  333.         // Close Side Nav Row
  334.         sideNavRows += "</td></tr>";
  335.     }
  336.     document.write(sideNavRows);
  337. }